#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "Artifact.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class Deployment;

/// <summary>
/// DeploymentSpecification
/// A deployment specification specifies a set of properties that determine
/// execution parameters of a component artifact that is deployed on a node. A
/// deployment specification can be aimed at a specific type of container. An
/// artifact that reifies or implements deployment specification properties is a
/// deployment descriptor.
/// </summary>
class UMLMODEL_EXPORT DeploymentSpecification : public Artifact {

public: // Constructors and destructors
    explicit DeploymentSpecification(const QString& umlType="uml::DeploymentSpecification");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// deployment getter
    /// The deployment with which the DeploymentSpecification is associated.
    /// </summary>
    shared_ptr<Deployment> deployment() const;

    /// <summary>
    /// deployment setter
    /// The deployment with which the DeploymentSpecification is associated.
    /// </summary>
    void setDeployment(shared_ptr<Deployment> value);

    /// <summary>
    /// deploymentLocation getter
    /// The location where an Artifact is deployed onto a Node. This is typically a
    /// 'directory' or 'memory address.'
    /// </summary>
    QString deploymentLocation() const;

    /// <summary>
    /// deploymentLocation setter
    /// The location where an Artifact is deployed onto a Node. This is typically a
    /// 'directory' or 'memory address.'
    /// </summary>
    void setDeploymentLocation(const QString& value);

    /// <summary>
    /// executionLocation getter
    /// The location where a component Artifact executes. This may be a local or remote
    /// location.
    /// </summary>
    QString executionLocation() const;

    /// <summary>
    /// executionLocation setter
    /// The location where a component Artifact executes. This may be a local or remote
    /// location.
    /// </summary>
    void setExecutionLocation(const QString& value);

private: // Fields
    /// <summary>
    /// deployment
    /// The deployment with which the DeploymentSpecification is associated.
    /// </summary>
    shared_ptr<Deployment> deployment_;

    /// <summary>
    /// deploymentLocation
    /// The location where an Artifact is deployed onto a Node. This is typically a
    /// 'directory' or 'memory address.'
    /// </summary>
    const static QString deploymentLocation_default_;
    QString deploymentLocation_= deploymentLocation_default_;

    /// <summary>
    /// executionLocation
    /// The location where a component Artifact executes. This may be a local or remote
    /// location.
    /// </summary>
    const static QString executionLocation_default_;
    QString executionLocation_= executionLocation_default_;

};

} // namespace uml
